<script setup>
const props = defineProps({
  data: Array,
});
</script>

<template>
  <select @change="$emit('setTargetChange', $event.target.value)">
    <!-- value 选中提交表单的值 -->
    <option v-for="(title, index) of data" :key="index" :value="index">{{ title }}</option>
  </select>
</template>

<style lang="less" scoped></style>
